<template>
	<view>
		<u-navbar :title="info.name" title-bold title-color='#333333'>
		</u-navbar>
		<view v-if="info.name=='服务使用协议'" style="padding: 30rpx;">
			<mp-html :content="info.service" />
		</view>
		<view v-if="info.name=='隐私协议'" cstyle="padding: 30rpx;">
			<mp-html :content="info.licence" />
		</view>
		<view v-if="info.name=='证照信息'" style="padding: 30rpx;display: flex;flex-wrap: wrap;">
			<view @click="previewImg(item)" style="width: 300rpx;height: 300rpx;margin-right: 20rpx;
			margin-bottom: 20rpx;" v-for="(item,index) in info.data">
				<image style="width: 100%;height: 100%;border-radius: 8rpx;" :src="item" />
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: null
			};
		},
		methods: {
			previewImg(logourl) {
				let _this = this;
				let imgsArray = [];
				imgsArray[0] = logourl
				uni.previewImage({
					current: 0,
					urls: imgsArray
				});
			},
		},
		onLoad(a) {
			this.info = JSON.parse(a.data)

			console.log(this.info.name)
		}
	}
</script>

<style lang="scss">

</style>
